From 6b8a2e6d917e970dd3e130a2045068b47e38b047 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Fri, 23 May 2025 22:15:13 +0200 Subject: [PATCH] extensionSystem: Catch errors when removing extension update We want to remove the temporary folder independently from whether the update succeeded or failed, so we currently remove it from a `finally` statement. Unfortunately that operation can fail as well, in which case we don't catch it and the exception interferes with startup. Fix this by removing the folder in a separate catch statement instead. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8417 Part-of: --- js/ui/extensionSystem.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index f12ee07a3..4f253f04e 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -669,8 +669,12 @@ export class ExtensionManager extends Signals.EventEmitter { FileUtils.recursivelyMoveDir(dir, extensionDir); } catch { log(`Failed to install extension updates for ${uuid}`); - } finally { + } + + try { FileUtils.recursivelyDeleteDir(dir, true); + } catch (e) { + console.error(`Failed to delete extension update: ${e.message}`); } } } -- 2.39.5